<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="robots" content="noodp" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
        <title>Linux系统启动过程 - Simple Life</title><meta name="Description" content="易娃的Blog"><meta property="og:title" content="Linux系统启动过程" />
<meta property="og:description" content="Linux 系统启动过程linux启动时我们会看到许多启动信息。 Linux系统的启动过程并不是大家想象中的那么复杂，其过程可以分为5个阶段： 内核的引导" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" /><meta property="og:image" content="https://alexwuyh.gitee.io/logo.png"/><meta property="article:section" content="posts" />
<meta property="article:published_time" content="2022-01-29T00:00:00+00:00" />
<meta property="article:modified_time" content="2022-01-29T00:00:00+00:00" />

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://alexwuyh.gitee.io/logo.png"/>

<meta name="twitter:title" content="Linux系统启动过程"/>
<meta name="twitter:description" content="Linux 系统启动过程linux启动时我们会看到许多启动信息。 Linux系统的启动过程并不是大家想象中的那么复杂，其过程可以分为5个阶段： 内核的引导"/>
<meta name="application-name" content="LoveIt">
<meta name="apple-mobile-web-app-title" content="LoveIt"><meta name="theme-color" content="#ffffff"><meta name="msapplication-TileColor" content="#da532c"><link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
        <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
        <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><link rel="manifest" href="/site.webmanifest"><link rel="canonical" href="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" /><link rel="prev" href="https://alexwuyh.gitee.io/Blog/ntp%E5%8D%8F%E8%AE%AE%E7%AE%80%E5%8D%95%E5%88%86%E6%9E%90/" /><link rel="next" href="https://alexwuyh.gitee.io/Blog/linux%E4%B8%8A%E5%88%A0%E9%99%A4%E6%96%87%E4%BB%B6%E5%90%8E%E7%A9%BA%E9%97%B4%E6%B2%A1%E6%9C%89%E8%A2%AB%E9%87%8A%E6%94%BE/" /><link rel="stylesheet" href="/Blog/lib/normalize/normalize.min.css"><link rel="stylesheet" href="/Blog/css/style.min.css"><link rel="stylesheet" href="/Blog/lib/fontawesome-free/all.min.css"><link rel="stylesheet" href="/Blog/lib/animate/animate.min.css"><script type="application/ld+json">
    {
        "@context": "http://schema.org",
        "@type": "BlogPosting",
        "headline": "Linux系统启动过程",
        "inLanguage": "zh-CN",
        "mainEntityOfPage": {
            "@type": "WebPage",
            "@id": "https:\/\/alexwuyh.gitee.io\/Blog\/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B\/"
        },"genre": "posts","keywords": "Linux","wordcount":  2868 ,
        "url": "https:\/\/alexwuyh.gitee.io\/Blog\/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B\/","datePublished": "2022-01-29T00:00:00+00:00","dateModified": "2022-01-29T00:00:00+00:00","publisher": {
            "@type": "Organization",
            "name": ""},"author": {
                "@type": "Person",
                "name": "Alex Wu"
            },"description": ""
    }
    </script></head>
    <body header-desktop="fixed" header-mobile="auto"><script type="text/javascript">(window.localStorage && localStorage.getItem('theme') ? localStorage.getItem('theme') === 'dark' : ('auto' === 'auto' ? window.matchMedia('(prefers-color-scheme: dark)').matches : 'auto' === 'dark')) && document.body.setAttribute('theme', 'dark');</script>

        <div id="mask"></div><div class="wrapper"><header class="desktop" id="header-desktop">
    <div class="header-wrapper">
        <div class="header-title">
            <a href="/Blog/" title="Simple Life"><span id="id-1" class="typeit"></span></a>
        </div>
        <div class="menu">
            <div class="menu-inner"><a class="menu-item" href="/Blog/Blog/posts/"> 文章 </a><a class="menu-item" href="/Blog/Blog/tags/"> 标签 </a><a class="menu-item" href="/Blog/Blog/categories/"> 分类 </a><span class="menu-item delimiter"></span><span class="menu-item search" id="search-desktop">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-desktop">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-desktop" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-desktop" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-desktop">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </span><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                    <i class="fas fa-adjust fa-fw"></i>
                </a>
            </div>
        </div>
    </div>
</header><header class="mobile" id="header-mobile">
    <div class="header-container">
        <div class="header-wrapper">
            <div class="header-title">
                <a href="/Blog/" title="Simple Life"><span id="id-2" class="typeit"></span></a>
            </div>
            <div class="menu-toggle" id="menu-toggle-mobile">
                <span></span><span></span><span></span>
            </div>
        </div>
        <div class="menu" id="menu-mobile"><div class="search-wrapper">
                    <div class="search mobile" id="search-mobile">
                        <input type="text" placeholder="搜索文章标题或内容..." id="search-input-mobile">
                        <a href="javascript:void(0);" class="search-button search-toggle" id="search-toggle-mobile" title="搜索">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <a href="javascript:void(0);" class="search-button search-clear" id="search-clear-mobile" title="清空">
                            <i class="fas fa-times-circle fa-fw"></i>
                        </a>
                        <span class="search-button search-loading" id="search-loading-mobile">
                            <i class="fas fa-spinner fa-fw fa-spin"></i>
                        </span>
                    </div>
                    <a href="javascript:void(0);" class="search-cancel" id="search-cancel-mobile">
                        取消
                    </a>
                </div><a class="menu-item" href="/Blog/Blog/posts/" title="">文章</a><a class="menu-item" href="/Blog/Blog/tags/" title="">标签</a><a class="menu-item" href="/Blog/Blog/categories/" title="">分类</a><a href="javascript:void(0);" class="menu-item theme-switch" title="切换主题">
                <i class="fas fa-adjust fa-fw"></i>
            </a></div>
    </div>
</header>
<div class="search-dropdown desktop">
    <div id="search-dropdown-desktop"></div>
</div>
<div class="search-dropdown mobile">
    <div id="search-dropdown-mobile"></div>
</div>
<main class="main">
                <div class="container"><div class="toc" id="toc-auto">
            <h2 class="toc-title">目录</h2>
            <div class="toc-content" id="toc-content-auto"></div>
        </div><article class="page single"><h1 class="single-title animated flipInX">Linux系统启动过程</h1><div class="post-meta">
            <div class="post-meta-line"><span class="post-author"><a href="/Blog/" title="Author" rel=" author" class="author"><i class="fas fa-user-circle fa-fw"></i>Alex Wu</a></span>&nbsp;<span class="post-category">收录于 <a href="/Blog/categories/linux/"><i class="far fa-folder fa-fw"></i>Linux</a></span></div>
            <div class="post-meta-line"><i class="far fa-calendar-alt fa-fw"></i>&nbsp;<time datetime="2022-01-29">2022-01-29</time>&nbsp;<i class="fas fa-pencil-alt fa-fw"></i>&nbsp;约 2868 字&nbsp;
                <i class="far fa-clock fa-fw"></i>&nbsp;预计阅读 6 分钟&nbsp;<span id="/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" class="leancloud_visitors" data-flag-title="Linux系统启动过程">
                        <i class="far fa-eye fa-fw"></i>&nbsp;<span class=leancloud-visitors-count></span>&nbsp;次阅读
                    </span>&nbsp;</div>
        </div><div class="details toc" id="toc-static"  kept="true">
                <div class="details-summary toc-title">
                    <span>目录</span>
                    <span><i class="details-icon fas fa-angle-right"></i></span>
                </div>
                <div class="details-content toc-content" id="toc-content-static"><nav id="TableOfContents">
  <ul>
    <li><a href="#内核引导">内核引导</a></li>
    <li><a href="#运行init">运行init</a></li>
    <li><a href="#运行级别">运行级别</a></li>
    <li><a href="#建立终端">建立终端</a></li>
    <li><a href="#图形模式与文字模式的切换方式">图形模式与文字模式的切换方式</a></li>
    <li><a href="#linux-关机">Linux 关机</a></li>
  </ul>
</nav></div>
            </div><div class="content" id="content"><p>Linux 系统启动过程linux启动时我们会看到许多启动信息。
Linux系统的启动过程并不是大家想象中的那么复杂，其过程可以分为5个阶段：</p>
<ul>
<li>
<p>内核的引导。</p>
</li>
<li>
<p>运行 init。</p>
</li>
<li>
<p>系统初始化。</p>
</li>
<li>
<p>建立终端 。</p>
</li>
<li>
<p>用户登录系统。</p>
<blockquote>
<p>init程序的类型：</p>
<ul>
<li>SysV: init, CentOS 5之前, 配置文件： <code>/etc/inittab</code>。</li>
<li>Upstart: init,CentOS 6, 配置文件： <code>/etc/inittab</code>, <code>/etc/init/*.conf</code>。</li>
<li>Systemd： systemd, CentOS 7,配置文件： <code>/usr/lib/systemd/system</code>、 <code>/etc/systemd/system</code>。</li>
</ul>
</blockquote>
</li>
</ul>
<h2 id="内核引导">内核引导</h2>
<p>当计算机打开电源后，首先是BIOS开机自检，按照BIOS中设置的启动设备（通常是硬盘）来启动。
操作系统接管硬件以后，首先读入 <code>/boot</code> 目录下的内核文件。
<img
        class="lazyload"
        src="/Blog/svg/loading.min.svg"
        data-src="https://upyun.oneone.life/upyun-img/20210303171408.png"
        data-srcset="https://upyun.oneone.life/upyun-img/20210303171408.png, https://upyun.oneone.life/upyun-img/20210303171408.png 1.5x, https://upyun.oneone.life/upyun-img/20210303171408.png 2x"
        data-sizes="auto"
        alt="https://upyun.oneone.life/upyun-img/20210303171408.png"
        title="image_1deud4r5q111o1129e1cjqcc4a9.png-5.9kB" /></p>
<h2 id="运行init">运行init</h2>
<p>init 进程是系统所有进程的起点，你可以把它比拟成系统所有进程的老祖宗，没有这个进程，系统中任何进程都不会启动。
init 程序首先是需要读取配置文件 <code>/etc/inittab</code>。
<img
        class="lazyload"
        src="/Blog/svg/loading.min.svg"
        data-src="https://upyun.oneone.life/upyun-img/20210303171431.png"
        data-srcset="https://upyun.oneone.life/upyun-img/20210303171431.png, https://upyun.oneone.life/upyun-img/20210303171431.png 1.5x, https://upyun.oneone.life/upyun-img/20210303171431.png 2x"
        data-sizes="auto"
        alt="https://upyun.oneone.life/upyun-img/20210303171431.png"
        title="image_1deud5g4ba2217tf1i5immnk06m.png-6.6kB" /></p>
<h2 id="运行级别">运行级别</h2>
<p>许多程序需要开机启动。它们在Windows叫做&quot;服务&quot;（service），在Linux就叫做&quot;守护进程&quot;（daemon）。
init进程的一大任务，就是去运行这些开机启动的程序。
但是，不同的场合需要启动不同的程序，比如用作服务器时，需要启动Apache，用作桌面就不需要。
Linux允许为不同的场合，分配不同的开机启动程序，这就叫做&quot;运行级别&quot;（runlevel）。也就是说，启动时根据&quot;运行级别&quot;，确定要运行哪些程序。
<img
        class="lazyload"
        src="/Blog/svg/loading.min.svg"
        data-src="https://upyun.oneone.life/upyun-img/20210303171450.png"
        data-srcset="https://upyun.oneone.life/upyun-img/20210303171450.png, https://upyun.oneone.life/upyun-img/20210303171450.png 1.5x, https://upyun.oneone.life/upyun-img/20210303171450.png 2x"
        data-sizes="auto"
        alt="https://upyun.oneone.life/upyun-img/20210303171450.png"
        title="image_1deud5usa1k871qgv14q0j2m1fv413.png-8.2kB" />
Linux系统有7个运行级别(runlevel)：</p>
<ul>
<li>运行级别0：系统停机状态，系统默认运行级别不能设为0，否则不能正常启动</li>
<li>运行级别1：单用户工作状态，root权限，用于系统维护，禁止远程登陆</li>
<li>运行级别2：多用户状态(没有NFS)</li>
<li>运行级别3：完全的多用户状态(有NFS)，登陆后进入控制台命令行模式</li>
<li>运行级别4：系统未使用，保留</li>
<li>运行级别5：X11控制台，登陆后进入图形GUI模式</li>
<li>运行级别6：系统正常关闭并重启，默认运行级别不能设为6，否则不能正常启动</li>
</ul>
<p>##系统初始化</p>
<p>在init的配置文件中有这么一行： <code>si::sysinit:/etc/rc.d/rc.sysinit</code>　它调用执行了<code>/etc/rc.d/rc.sysinit</code>，而<code>rc.sysinit</code>是一个<code>bash shell</code>的脚本，它主要是完成一些系统初始化的工作，<code>rc.sysinit</code>是每一个运行级别都要首先运行的重要脚本。
它主要完成的工作有：激活交换分区，检查磁盘，加载硬件模块以及其它一些需要优先执行任务。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell">l5:5:wait:/etc/rc.d/rc <span class="m">5</span>
</code></pre></td></tr></table>
</div>
</div><p>这一行表示以5为参数运行<code>/etc/rc.d/rc</code>，<code>/etc/rc.d/rc</code>是一个Shell脚本，它接受5作为参数，去执行<code>/etc/rc.d/rc5.d/</code>目录下的所有的rc启动脚本，<code>/etc/rc.d/rc5.d/</code>目录中的这些启动脚本实际上都是一些连接文件，而不是真正的rc启动脚本，真正的rc启动脚本实际上都是放在<code>/etc/rc.d/init.d/</code>目录下。
而这些rc启动脚本有着类似的用法，它们一般能接受<code>start</code>、<code>stop</code>、<code>restart</code>、<code>status</code>等参数。
<code>/etc/rc.d/rc5.d/</code>中的<code>rc</code>启动脚本通常是<code>K</code>或<code>S</code>开头的连接文件，对于以 <code>S</code> 开头的启动脚本，将以<code>start</code>参数来运行。
而如果发现存在相应的脚本也存在K打头的连接，而且已经处于运行态了(以<code>/var/lock/subsys/</code>下的文件作为标志)，则将首先以<code>stop</code>为参数停止这些已经启动了的守护进程，然后再重新运行。
这样做是为了保证是当<code>init</code>改变运行级别时，所有相关的守护进程都将重启。
至于在每个运行级中将运行哪些守护进程，用户可以通过<code>chkconfig</code>或<code>setup</code>中的<code>&quot;System Services&quot;</code>来自行设定。
<img
        class="lazyload"
        src="/Blog/svg/loading.min.svg"
        data-src="https://upyun.oneone.life/upyun-img/20210303171503.png"
        data-srcset="https://upyun.oneone.life/upyun-img/20210303171503.png, https://upyun.oneone.life/upyun-img/20210303171503.png 1.5x, https://upyun.oneone.life/upyun-img/20210303171503.png 2x"
        data-sizes="auto"
        alt="https://upyun.oneone.life/upyun-img/20210303171503.png"
        title="image_1deudgg2o16elpnv9f41f2dhvg20.png-11.4kB" /></p>
<h2 id="建立终端">建立终端</h2>
<p><code>rc</code>执行完毕后，返<code>回init</code>。这时基本系统环境已经设置好了，各种守护进程也已经启动了。
<code>init</code>接下来会打开<code>6</code>个终端，以便用户登录系统。在<code>inittab</code>中的以下<code>6</code>行就是定义了<code>6</code>个终端：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell">1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
</code></pre></td></tr></table>
</div>
</div><p>从上面可以看出在2、3、4、5的运行级别中都将以respawn方式运行mingetty程序，mingetty程序能打开终端、设置模式。
同时它会显示一个文本登录界面，这个界面就是我们经常看到的登录界面，在这个登录界面中会提示用户输入用户名，而用户输入的用户将作为参数传给login程序来验证用户的身份。</p>
<p>##用户登录系统</p>
<p>一般来说，用户的登录方式有三种：</p>
<ul>
<li>（1）命令行登录</li>
<li>（2）ssh登录</li>
<li>（3）图形界面登录</li>
</ul>
<p><img
        class="lazyload"
        src="/Blog/svg/loading.min.svg"
        data-src="https://upyun.oneone.life/upyun-img/20210303171516.png"
        data-srcset="https://upyun.oneone.life/upyun-img/20210303171516.png, https://upyun.oneone.life/upyun-img/20210303171516.png 1.5x, https://upyun.oneone.life/upyun-img/20210303171516.png 2x"
        data-sizes="auto"
        alt="https://upyun.oneone.life/upyun-img/20210303171516.png"
        title="image_1deudj2af1flv1ade1c9uiqi1ufu2d.png-13.2kB" /></p>
<p>对于运行级别为5的图形方式用户来说，他们的登录是通过一个图形化的登录界面。登录成功后可以直接进入 KDE、Gnome 等窗口管理器。
而本文主要讲的还是文本方式登录的情况：当我们看到mingetty的登录界面时，我们就可以输入用户名和密码来登录系统了。
Linux 的账号验证程序是 login，login 会接收 mingetty 传来的用户名作为用户名参数。
然后 login 会对用户名进行分析：如果用户名不是 root，且存在 <code>/etc/nologin</code> 文件，login 将输出 nologin 文件的内容，然后退出。
这通常用来系统维护时防止非root用户登录。只有<code>/etc/securetty</code>中登记了的终端才允许 root 用户登录，如果不存在这个文件，则 root 用户可以在任何终端上登录。
<code>/etc/usertty</code>文件用于对用户作出附加访问限制，如果不存在这个文件，则没有其他限制。</p>
<h2 id="图形模式与文字模式的切换方式">图形模式与文字模式的切换方式</h2>
<p>Linux预设提供了六个命令窗口终端机让我们来登录。
默认我们登录的就是第一个窗口，也就是tty1，这个六个窗口分别为tty1,tty2 … tty6，你可以按下<code>Ctrl + Alt + F1 ~ F6</code> 来切换它们。
如果你安装了图形界面，默认情况下是进入图形界面的，此时你就可以按<code>Ctrl + Alt + F1 ~ F6</code>来进入其中一个命令窗口界面。
当你进入命令窗口界面后再返回图形界面只要按下<code>Ctrl + Alt + F7</code> 就回来了。
如果你用的vmware 虚拟机，命令窗口切换的快捷键为 <code>Alt + Space + F1~F6</code>. 如果你在图形界面下请按<code>Alt + Shift + Ctrl + F1~F6</code> 切换至命令窗口。
<img
        class="lazyload"
        src="/Blog/svg/loading.min.svg"
        data-src="https://upyun.oneone.life/upyun-img/20210303171535.png"
        data-srcset="https://upyun.oneone.life/upyun-img/20210303171535.png, https://upyun.oneone.life/upyun-img/20210303171535.png 1.5x, https://upyun.oneone.life/upyun-img/20210303171535.png 2x"
        data-sizes="auto"
        alt="https://upyun.oneone.life/upyun-img/20210303171535.png"
        title="image_1deudk4v91bor1q7b11p61dj71tet2q.png-15.5kB" /></p>
<h2 id="linux-关机">Linux 关机</h2>
<p>在linux领域内大多用在服务器上，很少遇到关机的操作。毕竟服务器上跑一个服务是永无止境的，除非特殊情况下，不得已才会关机。
正确的关机流程为：<code>sync &gt; shutdown &gt; reboot &gt; halt</code>
关机指令为：<code>shutdown</code> ，你可以<code>man shutdown</code> 来看一下帮助文档。
例如你可以运行如下命令关机：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span><span class="lnt">17
</span><span class="lnt">18
</span><span class="lnt">19
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell">sync <span class="c1">#将数据由内存同步到硬盘中。</span>

shutdown <span class="c1">#关机指令，你可以man shutdown 来看一下帮助文档。例如你可以运行如下命令关机：</span>

shutdown –h <span class="m">10</span> ‘This server will shutdown after <span class="m">10</span> mins’ <span class="c1">#这个命令告诉大家，计算机将在10分钟后关机，并且会显示在登陆用户的当前屏幕中。</span>

shutdown –h now <span class="c1">#立马关机</span>

shutdown –h 20:25 <span class="c1">#系统会在今天20:25关机</span>

shutdown –h +10 <span class="c1">#十分钟后关机</span>

shutdown –r now <span class="c1">#系统立马重启</span>

shutdown –r +10 <span class="c1">#系统十分钟后重启</span>

reboot <span class="c1">#就是重启，等同于 shutdown –r now</span>

halt <span class="c1">#关闭系统，等同于shutdown –h now 和 poweroff</span>
</code></pre></td></tr></table>
</div>
</div><p>最后总结一下，不管是重启系统还是关闭系统，首先要运行 sync 命令，把内存中的数据写到磁盘中。
关机的命令有 <code>shutdown –h now halt poweroff</code> 和 <code>init 0</code> , 重启系统的命令有 <code>shutdown –r now</code> <code>reboot init 6</code>。</p>
</div><div class="post-footer" id="post-footer">
    <div class="post-info">
        <div class="post-info-line">
            <div class="post-info-mod">
                <span>更新于 2022-01-29</span>
            </div>
            <div class="post-info-license"></div>
        </div>
        <div class="post-info-line">
            <div class="post-info-md"><span>
                            <a class="link-to-markdown" href="/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/index.md" target="_blank">阅读原始文档</a>
                        </span></div>
            <div class="post-info-share">
                <span><a href="javascript:void(0);" title="分享到 Twitter" data-sharer="twitter" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-title="Linux系统启动过程" data-via="Alex_WuYh" data-hashtags="Linux"><i class="fab fa-twitter fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Facebook" data-sharer="facebook" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-hashtag="Linux"><i class="fab fa-facebook-square fa-fw"></i></a><a href="javascript:void(0);" title="分享到 WhatsApp" data-sharer="whatsapp" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-title="Linux系统启动过程" data-web><i class="fab fa-whatsapp fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Line" data-sharer="line" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-title="Linux系统启动过程"><i data-svg-src="/Blog/lib/simple-icons/icons/line.min.svg"></i></a><a href="javascript:void(0);" title="分享到 微博" data-sharer="weibo" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-title="Linux系统启动过程" data-ralateuid="AlexWuYh"><i class="fab fa-weibo fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Myspace" data-sharer="myspace" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-title="Linux系统启动过程" data-description=""><i data-svg-src="/Blog/lib/simple-icons/icons/myspace.min.svg"></i></a><a href="javascript:void(0);" title="分享到 Blogger" data-sharer="blogger" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-title="Linux系统启动过程" data-description=""><i class="fab fa-blogger fa-fw"></i></a><a href="javascript:void(0);" title="分享到 Evernote" data-sharer="evernote" data-url="https://alexwuyh.gitee.io/Blog/linux%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E8%BF%87%E7%A8%8B/" data-title="Linux系统启动过程"><i class="fab fa-evernote fa-fw"></i></a></span>
            </div>
        </div>
    </div>

    <div class="post-info-more">
        <section class="post-tags"><i class="fas fa-tags fa-fw"></i>&nbsp;<a href="/Blog/tags/linux/">Linux</a></section>
        <section>
            <span><a href="javascript:void(0);" onclick="window.history.back();">返回</a></span>&nbsp;|&nbsp;<span><a href="/Blog/">主页</a></span>
        </section>
    </div>

    <div class="post-nav"><a href="/Blog/ntp%E5%8D%8F%E8%AE%AE%E7%AE%80%E5%8D%95%E5%88%86%E6%9E%90/" class="prev" rel="prev" title="NTP协议简单分析"><i class="fas fa-angle-left fa-fw"></i>NTP协议简单分析</a>
            <a href="/Blog/linux%E4%B8%8A%E5%88%A0%E9%99%A4%E6%96%87%E4%BB%B6%E5%90%8E%E7%A9%BA%E9%97%B4%E6%B2%A1%E6%9C%89%E8%A2%AB%E9%87%8A%E6%94%BE/" class="next" rel="next" title="Linux上删除文件后空间没有被释放">Linux上删除文件后空间没有被释放<i class="fas fa-angle-right fa-fw"></i></a></div>
</div>
<div id="comments"><div id="valine" class="comment"></div><noscript>
                Please enable JavaScript to view the comments powered by <a href="https://valine.js.org/">Valine</a>.
            </noscript></div></article></div>
            </main><footer class="footer">
        <div class="footer-container"><div class="footer-line">由 <a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo 0.92.0">Hugo</a> 强力驱动 | 主题 - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt 0.2.10"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>
                </div><div class="footer-line"><i class="far fa-copyright fa-fw"></i><span itemprop="copyrightYear">2020 - 2022</span><span class="author" itemprop="copyrightHolder">&nbsp;<a href="/Blog/" target="_blank">Alex Wu</a></span>&nbsp;|&nbsp;<span class="license"><a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a></span><span class="icp-splitter">&nbsp;|&nbsp;</span><br class="icp-br"/>
                    <span class="icp">蜀ICP备20004229号-1</span></div>
        </div>
    </footer></div>

        <div id="fixed-buttons"><a href="#" id="back-to-top" class="fixed-button" title="回到顶部">
                <i class="fas fa-arrow-up fa-fw"></i>
            </a><a href="#" id="view-comments" class="fixed-button" title="查看评论">
                <i class="fas fa-comment fa-fw"></i>
            </a>
        </div><link rel="stylesheet" href="/Blog/lib/valine/valine.min.css"><link rel="stylesheet" href="/Blog/lib/katex/katex.min.css"><link rel="stylesheet" href="/Blog/lib/katex/copy-tex.min.css"><link rel="stylesheet" href="/Blog/lib/cookieconsent/cookieconsent.min.css"><script type="text/javascript" src="/Blog/lib/valine/Valine.min.js"></script><script type="text/javascript" src="/Blog/lib/smooth-scroll/smooth-scroll.min.js"></script><script type="text/javascript" src="/Blog/lib/autocomplete/autocomplete.min.js"></script><script type="text/javascript" src="/Blog/lib/lunr/lunr.min.js"></script><script type="text/javascript" src="/Blog/lib/lunr/lunr.stemmer.support.min.js"></script><script type="text/javascript" src="/Blog/lib/lunr/lunr.zh.min.js"></script><script type="text/javascript" src="/Blog/lib/lazysizes/lazysizes.min.js"></script><script type="text/javascript" src="/Blog/lib/clipboard/clipboard.min.js"></script><script type="text/javascript" src="/Blog/lib/sharer/sharer.min.js"></script><script type="text/javascript" src="/Blog/lib/typeit/typeit.min.js"></script><script type="text/javascript" src="/Blog/lib/katex/katex.min.js"></script><script type="text/javascript" src="/Blog/lib/katex/auto-render.min.js"></script><script type="text/javascript" src="/Blog/lib/katex/copy-tex.min.js"></script><script type="text/javascript" src="/Blog/lib/katex/mhchem.min.js"></script><script type="text/javascript" src="/Blog/lib/cookieconsent/cookieconsent.min.js"></script><script type="text/javascript">window.config={"code":{"copyTitle":"复制到剪贴板","maxShownLines":10},"comment":{"valine":{"appId":"o5gq6eLbupSlKq678zx1aKcd-gzGzoHsz","appKey":"S2CU3haJIhCbfVoIxhtrIzNp","avatar":"mp","el":"#valine","emojiCDN":"https://cdn.jsdelivr.net/npm/emoji-datasource-google@5.0.1/img/google/64/","emojiMaps":{"100":"1f4af.png","alien":"1f47d.png","anger":"1f4a2.png","angry":"1f620.png","anguished":"1f627.png","astonished":"1f632.png","black_heart":"1f5a4.png","blue_heart":"1f499.png","blush":"1f60a.png","bomb":"1f4a3.png","boom":"1f4a5.png","broken_heart":"1f494.png","brown_heart":"1f90e.png","clown_face":"1f921.png","cold_face":"1f976.png","cold_sweat":"1f630.png","confounded":"1f616.png","confused":"1f615.png","cry":"1f622.png","crying_cat_face":"1f63f.png","cupid":"1f498.png","dash":"1f4a8.png","disappointed":"1f61e.png","disappointed_relieved":"1f625.png","dizzy":"1f4ab.png","dizzy_face":"1f635.png","drooling_face":"1f924.png","exploding_head":"1f92f.png","expressionless":"1f611.png","face_vomiting":"1f92e.png","face_with_cowboy_hat":"1f920.png","face_with_hand_over_mouth":"1f92d.png","face_with_head_bandage":"1f915.png","face_with_monocle":"1f9d0.png","face_with_raised_eyebrow":"1f928.png","face_with_rolling_eyes":"1f644.png","face_with_symbols_on_mouth":"1f92c.png","face_with_thermometer":"1f912.png","fearful":"1f628.png","flushed":"1f633.png","frowning":"1f626.png","ghost":"1f47b.png","gift_heart":"1f49d.png","green_heart":"1f49a.png","grimacing":"1f62c.png","grin":"1f601.png","grinning":"1f600.png","hankey":"1f4a9.png","hear_no_evil":"1f649.png","heart":"2764-fe0f.png","heart_decoration":"1f49f.png","heart_eyes":"1f60d.png","heart_eyes_cat":"1f63b.png","heartbeat":"1f493.png","heartpulse":"1f497.png","heavy_heart_exclamation_mark_ornament":"2763-fe0f.png","hole":"1f573-fe0f.png","hot_face":"1f975.png","hugging_face":"1f917.png","hushed":"1f62f.png","imp":"1f47f.png","innocent":"1f607.png","japanese_goblin":"1f47a.png","japanese_ogre":"1f479.png","joy":"1f602.png","joy_cat":"1f639.png","kiss":"1f48b.png","kissing":"1f617.png","kissing_cat":"1f63d.png","kissing_closed_eyes":"1f61a.png","kissing_heart":"1f618.png","kissing_smiling_eyes":"1f619.png","laughing":"1f606.png","left_speech_bubble":"1f5e8-fe0f.png","love_letter":"1f48c.png","lying_face":"1f925.png","mask":"1f637.png","money_mouth_face":"1f911.png","nauseated_face":"1f922.png","nerd_face":"1f913.png","neutral_face":"1f610.png","no_mouth":"1f636.png","open_mouth":"1f62e.png","orange_heart":"1f9e1.png","partying_face":"1f973.png","pensive":"1f614.png","persevere":"1f623.png","pleading_face":"1f97a.png","pouting_cat":"1f63e.png","purple_heart":"1f49c.png","rage":"1f621.png","relaxed":"263a-fe0f.png","relieved":"1f60c.png","revolving_hearts":"1f49e.png","right_anger_bubble":"1f5ef-fe0f.png","robot_face":"1f916.png","rolling_on_the_floor_laughing":"1f923.png","scream":"1f631.png","scream_cat":"1f640.png","see_no_evil":"1f648.png","shushing_face":"1f92b.png","skull":"1f480.png","skull_and_crossbones":"2620-fe0f.png","sleeping":"1f634.png","sleepy":"1f62a.png","slightly_frowning_face":"1f641.png","slightly_smiling_face":"1f642.png","smile":"1f604.png","smile_cat":"1f638.png","smiley":"1f603.png","smiley_cat":"1f63a.png","smiling_face_with_3_hearts":"1f970.png","smiling_imp":"1f608.png","smirk":"1f60f.png","smirk_cat":"1f63c.png","sneezing_face":"1f927.png","sob":"1f62d.png","space_invader":"1f47e.png","sparkling_heart":"1f496.png","speak_no_evil":"1f64a.png","speech_balloon":"1f4ac.png","star-struck":"1f929.png","stuck_out_tongue":"1f61b.png","stuck_out_tongue_closed_eyes":"1f61d.png","stuck_out_tongue_winking_eye":"1f61c.png","sunglasses":"1f60e.png","sweat":"1f613.png","sweat_drops":"1f4a6.png","sweat_smile":"1f605.png","thinking_face":"1f914.png","thought_balloon":"1f4ad.png","tired_face":"1f62b.png","triumph":"1f624.png","two_hearts":"1f495.png","unamused":"1f612.png","upside_down_face":"1f643.png","weary":"1f629.png","white_frowning_face":"2639-fe0f.png","white_heart":"1f90d.png","wink":"1f609.png","woozy_face":"1f974.png","worried":"1f61f.png","yawning_face":"1f971.png","yellow_heart":"1f49b.png","yum":"1f60b.png","zany_face":"1f92a.png","zipper_mouth_face":"1f910.png","zzz":"1f4a4.png"},"enableQQ":false,"highlight":true,"lang":"zh-cn","pageSize":10,"placeholder":"你的评论 ...","recordIP":true,"visitor":true}},"cookieconsent":{"content":{"dismiss":"同意","link":"了解更多","message":"本网站使用 Cookies 来改善您的浏览体验."},"enable":true,"palette":{"button":{"background":"#f0f0f0"},"popup":{"background":"#1aa3ff"}},"theme":"edgeless"},"data":{"id-1":"Simple Life","id-2":"Simple Life"},"math":{"delimiters":[{"display":true,"left":"$$","right":"$$"},{"display":true,"left":"\\[","right":"\\]"},{"display":false,"left":"$","right":"$"},{"display":false,"left":"\\(","right":"\\)"}],"strict":false},"search":{"highlightTag":"em","lunrIndexURL":"/Blog/index.json","lunrLanguageCode":"zh","lunrSegmentitURL":"/Blog/lib/lunr/lunr.segmentit.js","maxResultLength":10,"noResultsFound":"没有找到结果","snippetLength":50,"type":"lunr"},"typeit":{"cursorChar":"|","cursorSpeed":1000,"data":{"id-1":["id-1"],"id-2":["id-2"]},"duration":-1,"speed":100}};</script><script type="text/javascript" src="/Blog/js/theme.min.js"></script><script type="text/javascript">
            window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());
            gtag('config', 'G-KJGDZS4RKJ', { 'anonymize_ip': true });
        </script><script type="text/javascript" src="https://www.googletagmanager.com/gtag/js?id=G-KJGDZS4RKJ" async></script></body>
</html>
